<template>
  <section class="group-list">
    <simple-slot title="通过审核活动列表">
      <Button type="primary" icon="md-paper" @click="doNew">
        发布活动
      </Button>
    </simple-slot>
    <div class="inner">
      <act-item :data="i" v-for="i in list" :key="i.id" :type="2" @delect="delect"></act-item>
      <div class="page-container">
        <Page :total="num" @on-change="pab" />
      </div>
    </div>
  </section>
</template>

<script>
import SimpleSlot from '../../../components/Title/SimpleSlot'
import ActItem from '../../../components/ListItem/ActItem'
export default {
  name: 'ThemetActChecked',
  components: {
      SimpleSlot,
      ActItem
  },
   data () {
      return {
          list: [],
          page:1,
          num:''
      }
   },
    created () {
     this.getinfo()
    },
    computed: {

    },
    methods: {
        doNew () {
            this.$router.push({path: '/my/mytheme/publishact'})
        },
        pab (page) {
            this.page = page
            this.getinfo()
        },
        delect (){
            this.getinfo()
        },
        getinfo() {
            let _this =this
            _this.$post('/api/activity/myActivity',
                {
                    token:_this.$token,
                    status:2,
                    page:_this.page,
                    num:10
                }, function (res) {
                    _this.list = res.data
                    _this.num = parseInt(res.data.length)
                }, function (errcode, errmsg,err) {
                    console.log(err)
                    console.log(errmsg)
                })
        }
    }
}

</script>

<style lang="less" scoped>
  @import "../../../style/style.less";
  .group-list {
    border: 1px solid @border-color;
    padding: 15px;
    .inner {
      padding-top: 15px;
    }
  }
</style>
